package com.xidian.zhiancloud.dao.riskcontrol;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.github.pagehelper.Page;
import com.xidian.zhiancloud.model.riskcontrol.TRiskLedgerStatusList;
import com.xidian.zhiancloud.model.riskcontrol.entity.TRLedgerStaGY00Entity;
import com.xidian.zhiancloud.model.riskcontrol.entity.TRLedgerStaSS00Entity;
import com.xidian.zhiancloud.model.riskcontrol.entity.TRLedgerStaZY00Entity;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

public interface TRiskLedgerStatusMapper extends BaseMapper<TRiskLedgerStatusList> {

    //设备设施
    Page<TRLedgerStaSS00Entity> getLedgerStaSS00Data
    (@Param("searchkey") String searchkey,
     @Param("locale") String locale,
     @Param("unit") String unit,
     @Param("levelRisk") String levelRisk,
     @Param("companyId") Long companyId);

    //作业活动
    Page<TRLedgerStaZY00Entity> getLedgerStaZY00Data
    (@Param("searchkey") String searchkey,
     @Param("locale") String locale,
     @Param("unit") String unit,
     @Param("levelRisk") String levelRisk,
     @Param("companyId") Long companyId);

    //工艺节点
    Page<TRLedgerStaGY00Entity> getLedgerStaGY00Data
    (@Param("searchkey") String searchkey,
     @Param("locale") String locale,
     @Param("unit") String unit,
     @Param("levelRisk") String levelRisk,
     @Param("companyId") Long companyId);

    //全部
    Page<TRLedgerStaGY00Entity> getLedgerStaData
    (@Param("searchkey") String searchkey,
     @Param("locale") String locale,
     @Param("unit") String unit,
     @Param("levelRisk") String levelRisk,
     @Param("companyId") Long companyId);

    //添加
    int insertLedgerStaList(@Param("data") List<TRiskLedgerStatusList> list);

    List<TRiskLedgerStatusList> getRiskLedgerDetails
        (@Param("companyId") Long companyId,@Param("id") String id);

    //设备设施
    Page<TRLedgerStaSS00Entity> getExportLedgerStaSS00Data
    (@Param("companyId") Long companyId,List<Object> list);

    //作业活动
    Page<TRLedgerStaZY00Entity> getExportLedgerStaZY00Data
    (@Param("companyId") Long companyId,List<Object> list);

    //工艺节点
    Page<TRLedgerStaGY00Entity> getExportLedgerStaGY00Data
    (@Param("companyId") Long companyId,List<Object> list);

    int updateRiskLedgerDetails(@Param("id") String id,
        String majorFactors,String Leadconse,String warnSign,String dutyCall,
        String firstAidExt,String fireTel,String riskInfoCont);
    //查询重大风险类型
    List<TRiskLedgerStatusList> getImportantRisk(@RequestParam("levelRisk") String levelRisk);
}
